/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * NuevoCaso.java
 *
 * Created on 09-ene-2013, 16:12:32
 */
package gui;

import com.sun.awt.AWTUtilities;
import controladores.ControladorPrincipal;
import io.Calle;
import io.Caso;
import io.Direccion;
import io.Informante;
import io.Llamado;
import io.Nino_Adolescente;
import io.Operador;
import io.Persona;
import io.RelacionNinio;
import io.TipoDemanda;
import io.TipoMotivo;
import io.TipoOrientacion;
import io.TipoPersona;
import io.TipoSexo;
import io.TipoZona;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Shape;
import java.awt.geom.RoundRectangle2D;
import java.awt.print.PageFormat;
import java.awt.print.Paper;
import java.awt.print.Printable;
import java.awt.print.PrinterJob;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.Iterator;
import javax.imageio.ImageIO;
import javax.swing.DefaultComboBoxModel;
import javax.swing.ImageIcon;
import javax.swing.JSpinner;
import javax.swing.SpinnerDateModel;
import utilidades.JFrameConFondo;

/**
 *
 * @author NiCo
 */
public class ModificarCaso extends JFrameConFondo implements Printable {

    private int contador = 0;
    private Image icono = new ImageIcon(getClass().getResource("/imagenes/logo.png")).getImage();
    private final Caso caso;
    private Informante informante = null;

    /** Creates new form NuevoCaso */
    public ModificarCaso(Caso caso) {
        initComponents();
        SpinnerDateModel sm = new SpinnerDateModel(new Date(), null, null, Calendar.HOUR_OF_DAY);
        dtpHora.setModel(sm);
        JSpinner.DateEditor de = new JSpinner.DateEditor(dtpHora, "HH:mm");
        dtpHora.setEditor(de);
        pnl1.setVisible(true);
        pnl2.setVisible(false);
        pnl3.setVisible(false);
        pnl4.setVisible(false);
        btnAnterior.setVisible(false);
        setImagen("/imagenes/fondo.png");
        cboOperador.setModel(new DefaultComboBoxModel(ControladorPrincipal.getInstance().getControladorPersonas().listaOperadores().toArray()));
        cboCalle.setModel(new DefaultComboBoxModel(ControladorPrincipal.getInstance().getControladorCasos().listaCalles().toArray()));
        cboCalleInfo.setModel(new DefaultComboBoxModel(ControladorPrincipal.getInstance().getControladorCasos().listaCalles().toArray()));
        this.caso = caso;
        cargarDatos();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        btngMotivo = new javax.swing.ButtonGroup();
        btngDemanda = new javax.swing.ButtonGroup();
        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        buttonGroup3 = new javax.swing.ButtonGroup();
        btnMinimizar = new javax.swing.JButton();
        btnCerrar = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        jLayeredPane1 = new javax.swing.JLayeredPane();
        pnl1 = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        rbtnAyudaDirecta = new javax.swing.JRadioButton();
        rbtnConductaAdictiva = new javax.swing.JRadioButton();
        rbtnAsesoramiento = new javax.swing.JRadioButton();
        rbtnDesercionEscolar = new javax.swing.JRadioButton();
        rbtnSituacionCalle = new javax.swing.JRadioButton();
        rbtnIntervencion = new javax.swing.JRadioButton();
        rbtnViolencia = new javax.swing.JRadioButton();
        rbtnProblemaConducta = new javax.swing.JRadioButton();
        rbtnTrabajoInfantil = new javax.swing.JRadioButton();
        rbtnOtros = new javax.swing.JRadioButton();
        txtNroCaso = new javax.swing.JTextField();
        dtpFecha = new com.toedter.calendar.JDateChooser();
        dtpHora = new javax.swing.JSpinner();
        cboOperador = new javax.swing.JComboBox();
        cboAyuda = new javax.swing.JComboBox();
        cboViolencia = new javax.swing.JComboBox();
        pnl4 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jLabel38 = new javax.swing.JLabel();
        rbtnAsesoradoLlamado = new javax.swing.JRadioButton();
        rbtnEquipo102 = new javax.swing.JRadioButton();
        rbtnDerivado = new javax.swing.JRadioButton();
        txtDerivado = new javax.swing.JTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        txtIntervencionRealizada = new javax.swing.JTextArea();
        btnSiguiente2 = new javax.swing.JButton();
        pnl3 = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jLabel25 = new javax.swing.JLabel();
        jLabel26 = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        jLabel29 = new javax.swing.JLabel();
        jLabel32 = new javax.swing.JLabel();
        jLabel33 = new javax.swing.JLabel();
        jLabel34 = new javax.swing.JLabel();
        jLabel35 = new javax.swing.JLabel();
        jLabel36 = new javax.swing.JLabel();
        jLabel37 = new javax.swing.JLabel();
        txtNombreInfo = new javax.swing.JTextField();
        txtApellidoInfo = new javax.swing.JTextField();
        cboCalleInfo = new javax.swing.JComboBox();
        txtNroCalleInfo = new javax.swing.JTextField();
        txtPisoInfo = new javax.swing.JTextField();
        txtDptoInfo = new javax.swing.JTextField();
        txtTelefonoInfo = new javax.swing.JTextField();
        txtInsRepresente = new javax.swing.JTextField();
        txtRelacionNinio = new javax.swing.JTextField();
        rbtnAdulto = new javax.swing.JRadioButton();
        rbtnNinio = new javax.swing.JRadioButton();
        rbtnInstitucion = new javax.swing.JRadioButton();
        jButton1 = new javax.swing.JButton();
        pnl2 = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        txtNombre = new javax.swing.JTextField();
        txtApellido = new javax.swing.JTextField();
        txtDni = new javax.swing.JTextField();
        cboSexo = new javax.swing.JComboBox();
        txtEdad = new javax.swing.JSpinner();
        cboZona = new javax.swing.JComboBox();
        cboCalle = new javax.swing.JComboBox();
        txtNroCalle = new javax.swing.JTextField();
        txtPiso = new javax.swing.JTextField();
        txtDpto = new javax.swing.JTextField();
        txtTelefono = new javax.swing.JTextField();
        txtEscuela = new javax.swing.JTextField();
        txtNivel = new javax.swing.JTextField();
        btnSiguiente = new javax.swing.JButton();
        btnAnterior = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        btnMinimizar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/minimizar-normal.png"))); // NOI18N
        btnMinimizar.setBorder(null);
        btnMinimizar.setBorderPainted(false);
        btnMinimizar.setFocusPainted(false);
        btnMinimizar.setName("btnMinimizar"); // NOI18N
        btnMinimizar.setOpaque(false);
        btnMinimizar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                btnMinimizarMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                btnMinimizarMouseExited(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                btnMinimizarMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                btnMinimizarMouseReleased(evt);
            }
        });
        btnMinimizar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMinimizarActionPerformed(evt);
            }
        });

        btnCerrar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/cerrar-normal.png"))); // NOI18N
        btnCerrar.setBorder(null);
        btnCerrar.setBorderPainted(false);
        btnCerrar.setFocusPainted(false);
        btnCerrar.setName("btnCerrar"); // NOI18N
        btnCerrar.setOpaque(false);
        btnCerrar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                btnCerrarMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                btnCerrarMouseExited(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                btnCerrarMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                btnCerrarMouseReleased(evt);
            }
        });
        btnCerrar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCerrarActionPerformed(evt);
            }
        });

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/titulo-modificar-caso.png"))); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jLayeredPane1.setName("jLayeredPane1"); // NOI18N
        jLayeredPane1.setOpaque(true);

        pnl1.setName("pnl1"); // NOI18N

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Datos del caso", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N
        jPanel1.setName("jPanel1"); // NOI18N

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 16));
        jLabel2.setText("Nº de caso");
        jLabel2.setName("jLabel2"); // NOI18N

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel3.setText("Fecha de inicio");
        jLabel3.setName("jLabel3"); // NOI18N

        jLabel4.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel4.setText("Hora");
        jLabel4.setName("jLabel4"); // NOI18N

        jLabel5.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel5.setText("Operador/a");
        jLabel5.setName("jLabel5"); // NOI18N

        jLabel6.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel6.setText("Motivo:");
        jLabel6.setName("jLabel6"); // NOI18N

        jLabel7.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel7.setText("Tipo");
        jLabel7.setName("jLabel7"); // NOI18N

        jLabel8.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel8.setText("Tipo");
        jLabel8.setName("jLabel8"); // NOI18N

        jLabel9.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel9.setText("Tipo de demanda");
        jLabel9.setName("jLabel9"); // NOI18N

        btngMotivo.add(rbtnAyudaDirecta);
        rbtnAyudaDirecta.setFont(new java.awt.Font("Tahoma", 0, 12));
        rbtnAyudaDirecta.setText("Ayuda directa");
        rbtnAyudaDirecta.setName("rbtnAyudaDirecta"); // NOI18N
        rbtnAyudaDirecta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnAyudaDirectaActionPerformed(evt);
            }
        });

        btngMotivo.add(rbtnConductaAdictiva);
        rbtnConductaAdictiva.setFont(new java.awt.Font("Tahoma", 0, 12));
        rbtnConductaAdictiva.setText("Conductas adictivas");
        rbtnConductaAdictiva.setName("rbtnConductaAdictiva"); // NOI18N
        rbtnConductaAdictiva.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnConductaAdictivaActionPerformed(evt);
            }
        });

        btngDemanda.add(rbtnAsesoramiento);
        rbtnAsesoramiento.setFont(new java.awt.Font("Tahoma", 0, 12));
        rbtnAsesoramiento.setText("Asesoramiento");
        rbtnAsesoramiento.setName("rbtnAsesoramiento"); // NOI18N

        btngMotivo.add(rbtnDesercionEscolar);
        rbtnDesercionEscolar.setFont(new java.awt.Font("Tahoma", 0, 12));
        rbtnDesercionEscolar.setText("Deserción escolar");
        rbtnDesercionEscolar.setName("rbtnDesercionEscolar"); // NOI18N
        rbtnDesercionEscolar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnDesercionEscolarActionPerformed(evt);
            }
        });

        btngMotivo.add(rbtnSituacionCalle);
        rbtnSituacionCalle.setFont(new java.awt.Font("Tahoma", 0, 12));
        rbtnSituacionCalle.setText("Situación de calle");
        rbtnSituacionCalle.setName("rbtnSituacionCalle"); // NOI18N
        rbtnSituacionCalle.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnSituacionCalleActionPerformed(evt);
            }
        });

        btngDemanda.add(rbtnIntervencion);
        rbtnIntervencion.setFont(new java.awt.Font("Tahoma", 0, 12));
        rbtnIntervencion.setText("Intervención");
        rbtnIntervencion.setName("rbtnIntervencion"); // NOI18N

        btngMotivo.add(rbtnViolencia);
        rbtnViolencia.setFont(new java.awt.Font("Tahoma", 0, 12));
        rbtnViolencia.setText("Violencia");
        rbtnViolencia.setName("rbtnViolencia"); // NOI18N
        rbtnViolencia.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnViolenciaActionPerformed(evt);
            }
        });

        btngMotivo.add(rbtnProblemaConducta);
        rbtnProblemaConducta.setFont(new java.awt.Font("Tahoma", 0, 12));
        rbtnProblemaConducta.setText("Problemas de conducta");
        rbtnProblemaConducta.setName("rbtnProblemaConducta"); // NOI18N
        rbtnProblemaConducta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnProblemaConductaActionPerformed(evt);
            }
        });

        btngMotivo.add(rbtnTrabajoInfantil);
        rbtnTrabajoInfantil.setFont(new java.awt.Font("Tahoma", 0, 12));
        rbtnTrabajoInfantil.setText("Trabajo infantil");
        rbtnTrabajoInfantil.setName("rbtnTrabajoInfantil"); // NOI18N
        rbtnTrabajoInfantil.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnTrabajoInfantilActionPerformed(evt);
            }
        });

        btngMotivo.add(rbtnOtros);
        rbtnOtros.setFont(new java.awt.Font("Tahoma", 0, 12));
        rbtnOtros.setText("Otros");
        rbtnOtros.setName("rbtnOtros"); // NOI18N
        rbtnOtros.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnOtrosActionPerformed(evt);
            }
        });

        txtNroCaso.setEditable(false);
        txtNroCaso.setFont(new java.awt.Font("Tahoma", 0, 16));
        txtNroCaso.setName("txtNroCaso"); // NOI18N

        dtpFecha.setDateFormatString("dd/MM/yyyy");
        dtpFecha.setFont(new java.awt.Font("Tahoma", 0, 12));
        dtpFecha.setName("dtpFecha"); // NOI18N

        dtpHora.setFont(new java.awt.Font("Tahoma", 0, 12));
        dtpHora.setName("dtpHora"); // NOI18N

        cboOperador.setFont(new java.awt.Font("Tahoma", 0, 12));
        cboOperador.setName("cboOperador"); // NOI18N

        cboAyuda.setFont(new java.awt.Font("Tahoma", 0, 12));
        cboAyuda.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "LEGAL", "PSICOLOGICA" }));
        cboAyuda.setSelectedIndex(-1);
        cboAyuda.setEnabled(false);
        cboAyuda.setName("cboAyuda"); // NOI18N

        cboViolencia.setFont(new java.awt.Font("Tahoma", 0, 12));
        cboViolencia.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "MALTRATO", "ABANDONO", "ABUSO_SEXUAL", "TESTIGO_VIOLENCIA" }));
        cboViolencia.setSelectedIndex(-1);
        cboViolencia.setEnabled(false);
        cboViolencia.setName("cboViolencia"); // NOI18N

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(rbtnIntervencion)
                        .addGap(18, 18, 18)
                        .addComponent(rbtnAsesoramiento)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 127, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(92, 92, 92)
                        .addComponent(rbtnProblemaConducta)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 110, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(cboOperador, 0, 260, Short.MAX_VALUE)
                        .addGap(32, 32, 32))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel6)
                        .addGap(45, 45, 45)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(rbtnConductaAdictiva)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(rbtnAyudaDirecta)
                                    .addComponent(rbtnViolencia))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(jLabel7)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(cboViolencia, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(jLabel8)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(cboAyuda, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))))))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(92, 92, 92)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(rbtnTrabajoInfantil)
                            .addComponent(rbtnDesercionEscolar)
                            .addComponent(rbtnSituacionCalle)
                            .addComponent(rbtnOtros))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 144, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel9)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 250, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2)
                            .addComponent(jLabel3))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(txtNroCaso, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(dtpFecha, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(6, 6, 6)
                                .addComponent(jLabel4)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(dtpHora, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(txtNroCaso, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(dtpFecha, javax.swing.GroupLayout.DEFAULT_SIZE, 22, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel4)
                        .addComponent(dtpHora))
                    .addComponent(jLabel3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cboOperador, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbtnAyudaDirecta)
                    .addComponent(jLabel8)
                    .addComponent(jLabel6)
                    .addComponent(cboAyuda, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbtnViolencia)
                    .addComponent(jLabel7)
                    .addComponent(cboViolencia, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(rbtnConductaAdictiva)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(rbtnProblemaConducta)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(rbtnDesercionEscolar)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(rbtnTrabajoInfantil)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(rbtnSituacionCalle)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(rbtnOtros)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel9)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbtnIntervencion)
                    .addComponent(rbtnAsesoramiento))
                .addContainerGap())
        );

        javax.swing.GroupLayout pnl1Layout = new javax.swing.GroupLayout(pnl1);
        pnl1.setLayout(pnl1Layout);
        pnl1Layout.setHorizontalGroup(
            pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnl1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(25, Short.MAX_VALUE))
        );
        pnl1Layout.setVerticalGroup(
            pnl1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnl1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(67, Short.MAX_VALUE))
        );

        pnl1.setBounds(0, 0, 430, 460);
        jLayeredPane1.add(pnl1, javax.swing.JLayeredPane.DEFAULT_LAYER);

        pnl4.setName("pnl4"); // NOI18N

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Orientación de la operadora", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N
        jPanel4.setName("jPanel4"); // NOI18N

        jLabel38.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel38.setText("Intervención realizada");
        jLabel38.setName("jLabel38"); // NOI18N

        buttonGroup3.add(rbtnAsesoradoLlamado);
        rbtnAsesoradoLlamado.setFont(new java.awt.Font("Tahoma", 0, 12));
        rbtnAsesoradoLlamado.setText("Asesorado en el llamado");
        rbtnAsesoradoLlamado.setName("rbtnAsesoradoLlamado"); // NOI18N
        rbtnAsesoradoLlamado.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnAsesoradoLlamadoActionPerformed(evt);
            }
        });

        buttonGroup3.add(rbtnEquipo102);
        rbtnEquipo102.setFont(new java.awt.Font("Tahoma", 0, 12));
        rbtnEquipo102.setText("Equipo 102");
        rbtnEquipo102.setName("rbtnEquipo102"); // NOI18N
        rbtnEquipo102.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnEquipo102ActionPerformed(evt);
            }
        });

        buttonGroup3.add(rbtnDerivado);
        rbtnDerivado.setFont(new java.awt.Font("Tahoma", 0, 12));
        rbtnDerivado.setText("Derivado");
        rbtnDerivado.setName("rbtnDerivado"); // NOI18N
        rbtnDerivado.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnDerivadoActionPerformed(evt);
            }
        });

        txtDerivado.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtDerivado.setEnabled(false);
        txtDerivado.setName("txtDerivado"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        txtIntervencionRealizada.setColumns(20);
        txtIntervencionRealizada.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtIntervencionRealizada.setLineWrap(true);
        txtIntervencionRealizada.setRows(5);
        txtIntervencionRealizada.setEnabled(false);
        txtIntervencionRealizada.setName("txtIntervencionRealizada"); // NOI18N
        jScrollPane1.setViewportView(txtIntervencionRealizada);

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 378, Short.MAX_VALUE)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(rbtnDerivado)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtDerivado, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(rbtnEquipo102)
                    .addComponent(jLabel38)
                    .addComponent(rbtnAsesoradoLlamado))
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(rbtnAsesoradoLlamado)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(rbtnEquipo102)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbtnDerivado)
                    .addComponent(txtDerivado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addComponent(jLabel38)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        btnSiguiente2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/imprimir.png"))); // NOI18N
        btnSiguiente2.setBorderPainted(false);
        btnSiguiente2.setFocusPainted(false);
        btnSiguiente2.setName("btnSiguiente2"); // NOI18N
        btnSiguiente2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSiguiente2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnl4Layout = new javax.swing.GroupLayout(pnl4);
        pnl4.setLayout(pnl4Layout);
        pnl4Layout.setHorizontalGroup(
            pnl4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnl4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnl4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnSiguiente2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        pnl4Layout.setVerticalGroup(
            pnl4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnl4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 111, Short.MAX_VALUE)
                .addComponent(btnSiguiente2, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pnl4.setBounds(0, 0, 430, 450);
        jLayeredPane1.add(pnl4, javax.swing.JLayeredPane.DEFAULT_LAYER);

        pnl3.setName("pnl3"); // NOI18N

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Datos del informante", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N
        jPanel3.setName("jPanel3"); // NOI18N

        jLabel25.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel25.setText("<html>Institución que representa");
        jLabel25.setName("jLabel25"); // NOI18N

        jLabel26.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel26.setText("Apellido");
        jLabel26.setName("jLabel26"); // NOI18N

        jLabel28.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel28.setText("Nombre");
        jLabel28.setName("jLabel28"); // NOI18N

        jLabel29.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel29.setText("Teléfono");
        jLabel29.setName("jLabel29"); // NOI18N

        jLabel32.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel32.setText("<html>Relación con el niño/adolescente");
        jLabel32.setName("jLabel32"); // NOI18N

        jLabel33.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel33.setText("Dirección:");
        jLabel33.setName("jLabel33"); // NOI18N

        jLabel34.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel34.setText("Calle");
        jLabel34.setName("jLabel34"); // NOI18N

        jLabel35.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel35.setText("Nro.");
        jLabel35.setName("jLabel35"); // NOI18N

        jLabel36.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel36.setText("Piso");
        jLabel36.setName("jLabel36"); // NOI18N

        jLabel37.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel37.setText("Dpto.");
        jLabel37.setName("jLabel37"); // NOI18N

        txtNombreInfo.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtNombreInfo.setName("txtNombreInfo"); // NOI18N

        txtApellidoInfo.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtApellidoInfo.setName("txtApellidoInfo"); // NOI18N

        cboCalleInfo.setFont(new java.awt.Font("Tahoma", 0, 12));
        cboCalleInfo.setName("cboCalleInfo"); // NOI18N

        txtNroCalleInfo.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtNroCalleInfo.setName("txtNroCalleInfo"); // NOI18N

        txtPisoInfo.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtPisoInfo.setName("txtPisoInfo"); // NOI18N

        txtDptoInfo.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtDptoInfo.setName("txtDptoInfo"); // NOI18N

        txtTelefonoInfo.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtTelefonoInfo.setName("txtTelefonoInfo"); // NOI18N

        txtInsRepresente.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtInsRepresente.setName("txtInsRepresente"); // NOI18N

        txtRelacionNinio.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtRelacionNinio.setName("txtRelacionNinio"); // NOI18N

        buttonGroup1.add(rbtnAdulto);
        rbtnAdulto.setFont(new java.awt.Font("Tahoma", 1, 12));
        rbtnAdulto.setText("Adulto");
        rbtnAdulto.setName("rbtnAdulto"); // NOI18N

        buttonGroup1.add(rbtnNinio);
        rbtnNinio.setFont(new java.awt.Font("Tahoma", 1, 12));
        rbtnNinio.setText("Niño/Adolescente");
        rbtnNinio.setName("rbtnNinio"); // NOI18N

        buttonGroup1.add(rbtnInstitucion);
        rbtnInstitucion.setFont(new java.awt.Font("Tahoma", 1, 12));
        rbtnInstitucion.setText("Institución");
        rbtnInstitucion.setName("rbtnInstitucion"); // NOI18N

        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/buscar-informante.png"))); // NOI18N
        jButton1.setBorderPainted(false);
        jButton1.setFocusPainted(false);
        jButton1.setName("jButton1"); // NOI18N
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel33)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(19, 19, 19)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addComponent(jLabel36)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtPisoInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(10, 10, 10)
                                .addComponent(jLabel37)
                                .addGap(4, 4, 4)
                                .addComponent(txtDptoInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addComponent(jLabel34)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(cboCalleInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel35)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtNroCalleInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel29)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(txtTelefonoInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel25, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtInsRepresente, javax.swing.GroupLayout.PREFERRED_SIZE, 205, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel32, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(txtRelacionNinio, javax.swing.GroupLayout.DEFAULT_SIZE, 219, Short.MAX_VALUE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()
                                .addComponent(jLabel26)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtApellidoInfo))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()
                                .addComponent(jLabel28)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtNombreInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(rbtnAdulto)
                        .addGap(26, 26, 26)
                        .addComponent(rbtnNinio)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 23, Short.MAX_VALUE)
                        .addComponent(rbtnInstitucion)))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbtnAdulto)
                    .addComponent(rbtnInstitucion)
                    .addComponent(rbtnNinio))
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel28)
                            .addComponent(txtNombreInfo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel26)
                            .addComponent(txtApellidoInfo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel33))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(16, 16, 16)
                        .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(11, 11, 11)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel34)
                    .addComponent(cboCalleInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel35)
                    .addComponent(txtNroCalleInfo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel36)
                    .addComponent(txtPisoInfo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel37)
                    .addComponent(txtDptoInfo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel29)
                    .addComponent(txtTelefonoInfo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel25, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtInsRepresente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel32, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtRelacionNinio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(12, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout pnl3Layout = new javax.swing.GroupLayout(pnl3);
        pnl3.setLayout(pnl3Layout);
        pnl3Layout.setHorizontalGroup(
            pnl3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnl3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(44, Short.MAX_VALUE))
        );
        pnl3Layout.setVerticalGroup(
            pnl3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnl3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(59, Short.MAX_VALUE))
        );

        pnl3.setBounds(0, 0, 430, 410);
        jLayeredPane1.add(pnl3, javax.swing.JLayeredPane.DEFAULT_LAYER);

        pnl2.setName("pnl2"); // NOI18N

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Datos del niño/adolescente", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N
        jPanel2.setName("jPanel2"); // NOI18N

        jLabel10.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel10.setText("Edad");
        jLabel10.setName("jLabel10"); // NOI18N

        jLabel11.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel11.setText("Escuela");
        jLabel11.setName("jLabel11"); // NOI18N

        jLabel12.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel12.setText("Apellido");
        jLabel12.setName("jLabel12"); // NOI18N

        jLabel13.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel13.setText("DNI");
        jLabel13.setName("jLabel13"); // NOI18N

        jLabel14.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel14.setText("Nombre");
        jLabel14.setName("jLabel14"); // NOI18N

        jLabel15.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel15.setText("Teléfono");
        jLabel15.setName("jLabel15"); // NOI18N

        jLabel16.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel16.setText("Zona");
        jLabel16.setName("jLabel16"); // NOI18N

        jLabel17.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel17.setText("Sexo");
        jLabel17.setName("jLabel17"); // NOI18N

        jLabel18.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel18.setText("Nivel");
        jLabel18.setName("jLabel18"); // NOI18N

        jLabel19.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel19.setText("Dirección:");
        jLabel19.setName("jLabel19"); // NOI18N

        jLabel20.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel20.setText("Calle");
        jLabel20.setName("jLabel20"); // NOI18N

        jLabel21.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel21.setText("Nro.");
        jLabel21.setName("jLabel21"); // NOI18N

        jLabel22.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel22.setText("Piso");
        jLabel22.setName("jLabel22"); // NOI18N

        jLabel23.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel23.setText("Dpto.");
        jLabel23.setName("jLabel23"); // NOI18N

        txtNombre.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtNombre.setName("txtNombre"); // NOI18N

        txtApellido.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtApellido.setName("txtApellido"); // NOI18N

        txtDni.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtDni.setName("txtDni"); // NOI18N

        cboSexo.setFont(new java.awt.Font("Tahoma", 0, 12));
        cboSexo.setModel(new DefaultComboBoxModel(TipoSexo.values()));
        cboSexo.setName("cboSexo"); // NOI18N

        txtEdad.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtEdad.setName("txtEdad"); // NOI18N

        cboZona.setFont(new java.awt.Font("Tahoma", 0, 12));
        cboZona.setModel(new DefaultComboBoxModel(TipoZona.values()));
        cboZona.setName("cboZona"); // NOI18N

        cboCalle.setFont(new java.awt.Font("Tahoma", 0, 12));
        cboCalle.setName("cboCalle"); // NOI18N

        txtNroCalle.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtNroCalle.setName("txtNroCalle"); // NOI18N

        txtPiso.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtPiso.setName("txtPiso"); // NOI18N

        txtDpto.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtDpto.setName("txtDpto"); // NOI18N

        txtTelefono.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtTelefono.setName("txtTelefono"); // NOI18N

        txtEscuela.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtEscuela.setName("txtEscuela"); // NOI18N

        txtNivel.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtNivel.setName("txtNivel"); // NOI18N

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel14)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(txtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel12)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(txtApellido, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel19)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel16)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(cboZona, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel13)
                        .addGap(18, 18, 18)
                        .addComponent(txtDni, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel17)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(cboSexo, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel10)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtEdad, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(19, 19, 19)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jLabel22)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtPiso, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(10, 10, 10)
                                .addComponent(jLabel23)
                                .addGap(4, 4, 4)
                                .addComponent(txtDpto, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jLabel20)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(cboCalle, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel21)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtNroCalle, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel15)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(txtTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel11)
                            .addComponent(jLabel18))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtNivel, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtEscuela, javax.swing.GroupLayout.PREFERRED_SIZE, 276, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(50, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(txtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(txtApellido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel13)
                    .addComponent(txtDni, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(cboSexo, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel10)
                    .addComponent(txtEdad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel16)
                    .addComponent(cboZona, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel19)
                .addGap(11, 11, 11)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel20)
                    .addComponent(cboCalle, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel21)
                    .addComponent(txtNroCalle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel22)
                    .addComponent(txtPiso, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel23)
                    .addComponent(txtDpto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel15)
                    .addComponent(txtTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(txtEscuela, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel18)
                    .addComponent(txtNivel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout pnl2Layout = new javax.swing.GroupLayout(pnl2);
        pnl2.setLayout(pnl2Layout);
        pnl2Layout.setHorizontalGroup(
            pnl2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnl2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        pnl2Layout.setVerticalGroup(
            pnl2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnl2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(54, Short.MAX_VALUE))
        );

        pnl2.setBounds(0, 0, 430, 440);
        jLayeredPane1.add(pnl2, javax.swing.JLayeredPane.DEFAULT_LAYER);

        btnSiguiente.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/siguiente.png"))); // NOI18N
        btnSiguiente.setBorderPainted(false);
        btnSiguiente.setFocusPainted(false);
        btnSiguiente.setName("btnSiguiente"); // NOI18N
        btnSiguiente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSiguienteActionPerformed(evt);
            }
        });

        btnAnterior.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/anterior.png"))); // NOI18N
        btnAnterior.setBorderPainted(false);
        btnAnterior.setFocusPainted(false);
        btnAnterior.setName("btnAnterior"); // NOI18N
        btnAnterior.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAnteriorActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLayeredPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 422, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addGap(99, 99, 99)
                        .addComponent(btnMinimizar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnCerrar))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addComponent(btnAnterior, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 138, Short.MAX_VALUE)
                        .addComponent(btnSiguiente, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnCerrar, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnMinimizar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 442, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnAnterior, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnSiguiente, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnMinimizarMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnMinimizarMouseEntered

        btnMinimizar.setIcon(new ImageIcon(getClass().getResource("/imagenes/minimizar-activo.png")));     }//GEN-LAST:event_btnMinimizarMouseEntered

    private void btnMinimizarMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnMinimizarMouseExited

        btnMinimizar.setIcon(new ImageIcon(getClass().getResource("/imagenes/minimizar-normal.png")));     }//GEN-LAST:event_btnMinimizarMouseExited

    private void btnMinimizarMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnMinimizarMousePressed

        btnMinimizar.setIcon(new ImageIcon(getClass().getResource("/imagenes/minimizar-click.png")));     }//GEN-LAST:event_btnMinimizarMousePressed

    private void btnMinimizarMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnMinimizarMouseReleased

        btnMinimizar.setIcon(new ImageIcon(getClass().getResource("/imagenes/minimizar-normal.png")));     }//GEN-LAST:event_btnMinimizarMouseReleased

    private void btnMinimizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMinimizarActionPerformed

        this.setExtendedState(Principal.ICONIFIED);     }//GEN-LAST:event_btnMinimizarActionPerformed

    private void btnCerrarMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCerrarMouseEntered

        btnCerrar.setIcon(new ImageIcon(getClass().getResource("/imagenes/cerrar-activo.png")));     }//GEN-LAST:event_btnCerrarMouseEntered

    private void btnCerrarMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCerrarMouseExited

        btnCerrar.setIcon(new ImageIcon(getClass().getResource("/imagenes/cerrar-normal.png")));     }//GEN-LAST:event_btnCerrarMouseExited

    private void btnCerrarMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCerrarMousePressed

        btnCerrar.setIcon(new ImageIcon(getClass().getResource("/imagenes/cerrar-click.png")));     }//GEN-LAST:event_btnCerrarMousePressed

    private void btnCerrarMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCerrarMouseReleased

        btnCerrar.setIcon(new ImageIcon(getClass().getResource("/imagenes/cerrar-normal.png")));     }//GEN-LAST:event_btnCerrarMouseReleased

    private void btnCerrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCerrarActionPerformed
        this.dispose();
    }//GEN-LAST:event_btnCerrarActionPerformed

    private void rbtnAyudaDirectaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnAyudaDirectaActionPerformed
        cboAyuda.setEnabled(true);
        cboViolencia.setEnabled(false);
        cboAyuda.setSelectedIndex(-1);
        cboViolencia.setSelectedIndex(-1);
    }//GEN-LAST:event_rbtnAyudaDirectaActionPerformed

    private void rbtnViolenciaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnViolenciaActionPerformed
        cboAyuda.setEnabled(false);
        cboViolencia.setEnabled(true);
        cboAyuda.setSelectedIndex(-1);
        cboViolencia.setSelectedIndex(-1);
    }//GEN-LAST:event_rbtnViolenciaActionPerformed

    private void rbtnConductaAdictivaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnConductaAdictivaActionPerformed
        cboAyuda.setEnabled(false);
        cboViolencia.setEnabled(false);
        cboAyuda.setSelectedIndex(-1);
        cboViolencia.setSelectedIndex(-1);
    }//GEN-LAST:event_rbtnConductaAdictivaActionPerformed

    private void rbtnProblemaConductaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnProblemaConductaActionPerformed
        cboAyuda.setEnabled(false);
        cboViolencia.setEnabled(false);
        cboAyuda.setSelectedIndex(-1);
        cboViolencia.setSelectedIndex(-1);
    }//GEN-LAST:event_rbtnProblemaConductaActionPerformed

    private void rbtnDesercionEscolarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnDesercionEscolarActionPerformed
        cboAyuda.setEnabled(false);
        cboViolencia.setEnabled(false);
        cboAyuda.setSelectedIndex(-1);
        cboViolencia.setSelectedIndex(-1);
    }//GEN-LAST:event_rbtnDesercionEscolarActionPerformed

    private void rbtnTrabajoInfantilActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnTrabajoInfantilActionPerformed
        cboAyuda.setEnabled(false);
        cboViolencia.setEnabled(false);
        cboAyuda.setSelectedIndex(-1);
        cboViolencia.setSelectedIndex(-1);
    }//GEN-LAST:event_rbtnTrabajoInfantilActionPerformed

    private void rbtnSituacionCalleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnSituacionCalleActionPerformed
        cboAyuda.setEnabled(false);
        cboViolencia.setEnabled(false);
        cboAyuda.setSelectedIndex(-1);
        cboViolencia.setSelectedIndex(-1);
    }//GEN-LAST:event_rbtnSituacionCalleActionPerformed

    private void rbtnOtrosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnOtrosActionPerformed
        cboAyuda.setEnabled(false);
        cboViolencia.setEnabled(false);
        cboAyuda.setSelectedIndex(-1);
        cboViolencia.setSelectedIndex(-1);
    }//GEN-LAST:event_rbtnOtrosActionPerformed

    private void btnSiguienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSiguienteActionPerformed
        if (contador == 0) {
            if (dtpFecha.getDate() != null && cboOperador.getSelectedItem() != null && ((rbtnAyudaDirecta.isSelected() && cboAyuda.getSelectedItem() != null) || (rbtnViolencia.isSelected() && cboViolencia.getSelectedItem() != null) || rbtnConductaAdictiva.isSelected() || rbtnProblemaConducta.isSelected() || rbtnDesercionEscolar.isSelected() || rbtnTrabajoInfantil.isSelected() || rbtnSituacionCalle.isSelected() || rbtnOtros.isSelected()) && (rbtnIntervencion.isSelected() || rbtnAsesoramiento.isSelected())) {
                jLayeredPane1.moveToFront(pnl2);
                pnl1.setVisible(false);
                pnl2.setVisible(true);
                pnl3.setVisible(false);
                pnl4.setVisible(false);
                contador++;
                btnAnterior.setVisible(true);
            } else {
                MensajesInfo p1 = new MensajesInfo('e', "CamposVacios");
                p1.setLocationRelativeTo(null);
                p1.setIconImage(icono);
                p1.setVisible(true);
                Shape shape = new RoundRectangle2D.Float(0, 0, p1.getWidth(), p1.getHeight(), 30, 30);
                AWTUtilities.setWindowShape(p1, shape);
            }
        } else {
            if (contador == 1) {
                if (txtDni.getText().equals("") || isNumeric(txtDni.getText()) && (txtNroCalle.getText().equals("") || isNumeric(txtNroCalle.getText())) && (txtPiso.getText().equals("") || isNumeric(txtPiso.getText()))) {
                    jLayeredPane1.moveToFront(pnl3);
                    pnl1.setVisible(false);
                    pnl2.setVisible(false);
                    pnl3.setVisible(true);
                    pnl4.setVisible(false);
                    contador++;
                    if (txtPiso.getText().equals("")) {
                        txtPiso.setText("0");
                    }
                    if (txtNroCalle.getText().equals("")) {
                        txtNroCalle.setText("0");
                    }
                    if (txtDni.getText().equals("")) {
                        txtDni.setText("0");
                    }
                } else {
                    MensajesInfo p1 = new MensajesInfo('e', "ErrorNumero");
                    p1.setLocationRelativeTo(null);
                    p1.setIconImage(icono);
                    p1.setVisible(true);
                    Shape shape = new RoundRectangle2D.Float(0, 0, p1.getWidth(), p1.getHeight(), 30, 30);
                    AWTUtilities.setWindowShape(p1, shape);
                }
            } else {
                if (contador == 2) {
                    if ((txtNroCalleInfo.getText().equals("") || isNumeric(txtNroCalleInfo.getText())) && (txtPisoInfo.getText().equals("") || isNumeric(txtPisoInfo.getText()))) {
                        if (rbtnAdulto.isSelected() || rbtnInstitucion.isSelected() || rbtnNinio.isSelected()) {
                            jLayeredPane1.moveToFront(pnl4);
                            pnl1.setVisible(false);
                            pnl2.setVisible(false);
                            pnl3.setVisible(false);
                            pnl4.setVisible(true);
                            contador++;
                            btnSiguiente.setIcon(new ImageIcon(getClass().getResource("/imagenes/guardar-usuario.png")));
                            if (txtPisoInfo.getText().equals("")) {
                                txtPisoInfo.setText("0");
                            }
                            if (txtNroCalleInfo.getText().equals("")) {
                                txtNroCalleInfo.setText("0");
                            }
                        } else {
                            MensajesInfo p1 = new MensajesInfo('e', "TipoInformante");
                            p1.setLocationRelativeTo(null);
                            p1.setIconImage(icono);
                            p1.setVisible(true);
                            Shape shape = new RoundRectangle2D.Float(0, 0, p1.getWidth(), p1.getHeight(), 30, 30);
                            AWTUtilities.setWindowShape(p1, shape);
                        }
                    } else {
                        MensajesInfo p1 = new MensajesInfo('e', "ErrorNumero");
                        p1.setLocationRelativeTo(null);
                        p1.setIconImage(icono);
                        p1.setVisible(true);
                        Shape shape = new RoundRectangle2D.Float(0, 0, p1.getWidth(), p1.getHeight(), 30, 30);
                        AWTUtilities.setWindowShape(p1, shape);
                    }
                } else {
                    if (contador == 3) {
                        if ((rbtnAsesoradoLlamado.isSelected() && !txtIntervencionRealizada.getText().equals("")) || (rbtnEquipo102.isSelected()) || (rbtnDerivado.isSelected() && !txtDerivado.getText().equals(""))) {
                            if (informante == null) {
                                MensajesConf p2 = new MensajesConf("NuevoInformante", this);
                                p2.setLocationRelativeTo(null);
                                p2.setIconImage(icono);
                                p2.setVisible(true);
                                Shape shape = new RoundRectangle2D.Float(0, 0, p2.getWidth(), p2.getHeight(), 30, 30);
                                AWTUtilities.setWindowShape(p2, shape);
                            } else {
                                guardarDatos('b');
                            }
                        } else {
                            MensajesInfo p1 = new MensajesInfo('e', "CamposVacios");
                            p1.setLocationRelativeTo(null);
                            p1.setIconImage(icono);
                            p1.setVisible(true);
                            Shape shape = new RoundRectangle2D.Float(0, 0, p1.getWidth(), p1.getHeight(), 30, 30);
                            AWTUtilities.setWindowShape(p1, shape);
                        }
                    }
                }
            }
        }
    }//GEN-LAST:event_btnSiguienteActionPerformed

    private void btnAnteriorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAnteriorActionPerformed
        if (contador == 1) {
            jLayeredPane1.moveToFront(pnl1);
            pnl1.setVisible(true);
            pnl2.setVisible(false);
            pnl3.setVisible(false);
            pnl4.setVisible(false);
            contador--;
            btnAnterior.setVisible(false);
        } else {
            if (contador == 2) {
                jLayeredPane1.moveToFront(pnl2);
                pnl1.setVisible(false);
                pnl2.setVisible(true);
                pnl3.setVisible(false);
                pnl4.setVisible(false);
                contador--;
            } else {
                if (contador == 3) {
                    jLayeredPane1.moveToFront(pnl3);
                    pnl1.setVisible(false);
                    pnl2.setVisible(false);
                    pnl3.setVisible(true);
                    pnl4.setVisible(false);
                    contador--;
                    btnSiguiente.setIcon(new ImageIcon(getClass().getResource("/imagenes/siguiente.png")));
                }
            }
        }
    }//GEN-LAST:event_btnAnteriorActionPerformed

    private void btnSiguiente2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSiguiente2ActionPerformed
        if ((rbtnAsesoradoLlamado.isSelected() && !txtIntervencionRealizada.getText().equals("")) || (rbtnEquipo102.isSelected()) || (rbtnDerivado.isSelected() && !txtDerivado.getText().equals(""))) {
            PrinterJob job = PrinterJob.getPrinterJob();
            Paper hoja = new Paper();
            hoja.setImageableArea(0, 0, 595, 841);
            hoja.setSize(595, 841);
            job.setPrintable(this);
            try {
                // Diálogo para elegir el formato de impresión
                PageFormat pageFormat = new PageFormat();
                pageFormat.setPaper(hoja);
                //pageFormat = job.pageDialog(pageFormat);
                if (job.printDialog()) {
                    job.print();
                }
            } catch (Exception e) {
            }
        } else {
            MensajesInfo p1 = new MensajesInfo('e', "CamposVacios");
            p1.setLocationRelativeTo(null);
            p1.setIconImage(icono);
            p1.setVisible(true);
            Shape shape = new RoundRectangle2D.Float(0, 0, p1.getWidth(), p1.getHeight(), 30, 30);
            AWTUtilities.setWindowShape(p1, shape);
        }
    }//GEN-LAST:event_btnSiguiente2ActionPerformed

    private void rbtnAsesoradoLlamadoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnAsesoradoLlamadoActionPerformed
        txtIntervencionRealizada.setEnabled(true);
        txtDerivado.setEnabled(false);
        txtIntervencionRealizada.setText("");
        txtDerivado.setText("");
    }//GEN-LAST:event_rbtnAsesoradoLlamadoActionPerformed

    private void rbtnEquipo102ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnEquipo102ActionPerformed
        txtIntervencionRealizada.setEnabled(false);
        txtDerivado.setEnabled(false);
        txtIntervencionRealizada.setText("");
        txtDerivado.setText("");
    }//GEN-LAST:event_rbtnEquipo102ActionPerformed

    private void rbtnDerivadoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnDerivadoActionPerformed
        txtIntervencionRealizada.setEnabled(false);
        txtDerivado.setEnabled(true);
        txtIntervencionRealizada.setText("");
        txtDerivado.setText("");
    }//GEN-LAST:event_rbtnDerivadoActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        BuscarInformante p1 = new BuscarInformante(this);
        p1.setLocationRelativeTo(null);
        p1.setIconImage(icono);
        p1.setVisible(true);
        Shape shape = new RoundRectangle2D.Float(0, 0, p1.getWidth(), 363, 30, 30);
        AWTUtilities.setWindowShape(p1, shape);
    }//GEN-LAST:event_jButton1ActionPerformed

    public void setInformante(Informante info) {
        this.informante = info;
        txtNombreInfo.setText(info.getNombre());
        txtApellidoInfo.setText(info.getApellido());
        txtTelefonoInfo.setText(info.getTelefono());
        Iterator<RelacionNinio> it = info.getRelacionNinios().iterator();
        while (it.hasNext()) {
            RelacionNinio relacion = it.next();
            if (relacion.getCaso().getNumeroCaso() == this.caso.getNumeroCaso()) {
                txtRelacionNinio.setText(relacion.getRelacion());
                break;
            }
        }
        txtInsRepresente.setText(info.getInstitucionQueRepresenta());
        if (info.getTipoPersona() == TipoPersona.ADULTO) {
            rbtnAdulto.setSelected(true);
        } else {
            if (info.getTipoPersona() == TipoPersona.INSTITUCION) {
                rbtnInstitucion.setSelected(true);
            } else {
                if (info.getTipoPersona() == TipoPersona.NINIO) {
                    rbtnNinio.setSelected(true);
                }
            }
        }
        cboCalleInfo.setSelectedItem(info.getDireccion().getCalle());
        txtNroCalleInfo.setText(String.valueOf(info.getDireccion().getNuemero()));
        txtPisoInfo.setText(String.valueOf(info.getDireccion().getPiso()));
        txtDptoInfo.setText(info.getDireccion().getDepartamento());
    }

    private static boolean isNumeric(String cadena) {
        try {
            Long.parseLong(cadena);
            return true;
        } catch (NumberFormatException nfe) {
            return false;
        }
    }

    @Override
    public int print(Graphics g, PageFormat f, int pageIndex) {
        SimpleDateFormat sdf = new java.text.SimpleDateFormat("dd/MM/yyyy");
        SimpleDateFormat sdf1 = new java.text.SimpleDateFormat("HH:mm");
        Image check = null;
        if (pageIndex == 0) {
            try {
                // Imprime "Hola mundo" en la primera pagina, en la posicion 100,100
                Image img = ImageIO.read(new File("src/imagenes/ficha-recepcion.png").toURI().toURL());
                g.drawImage(img, 52, 0, 491, 801, null);
            } catch (Exception ex) {
            }
            try {
                // Imprime "Hola mundo" en la primera pagina, en la posicion 100,100
                check = ImageIO.read(new File("src/imagenes/check.png").toURI().toURL());
            } catch (Exception ex) {
            }
            //datos del caso
            g.setFont(new Font("Tahoma", Font.BOLD, 18));
            g.drawString(txtNroCaso.getText(), 123, 153);
            g.setFont(new Font("Tahoma", Font.PLAIN, 11));
            g.drawString(sdf.format(dtpFecha.getDate()), 130, 180);
            g.drawString(sdf1.format(dtpHora.getValue()), 245, 180);
            g.drawString(cboOperador.getSelectedItem().toString(), 133, 204);
            if (rbtnAyudaDirecta.isSelected()) {
                g.drawImage(check, 168, 210, 20, 20, null);
                g.drawString(cboAyuda.getSelectedItem().toString(), 220, 222);
            } else {
                if (rbtnViolencia.isSelected()) {
                    g.drawImage(check, 148, 228, 20, 20, null);
                    g.drawString(cboViolencia.getSelectedItem().toString(), 210, 241);
                } else {
                    if (rbtnConductaAdictiva.isSelected()) {
                        g.drawImage(check, 192, 246, 20, 20, null);
                    } else {
                        if (rbtnProblemaConducta.isSelected()) {
                            g.drawImage(check, 205, 264, 20, 20, null);
                        } else {
                            if (rbtnDesercionEscolar.isSelected()) {
                                g.drawImage(check, 181, 282, 20, 20, null);
                            } else {
                                if (rbtnTrabajoInfantil.isSelected()) {
                                    g.drawImage(check, 172, 299, 20, 20, null);
                                } else {
                                    if (rbtnSituacionCalle.isSelected()) {
                                        g.drawImage(check, 180, 317, 20, 20, null);
                                    } else {
                                        if (rbtnOtros.isSelected()) {
                                            g.drawImage(check, 234, 317, 20, 20, null);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            if (rbtnIntervencion.isSelected()) {
                g.drawImage(check, 133, 348, 20, 20, null);
            } else {
                if (rbtnAsesoramiento.isSelected()) {
                    g.drawImage(check, 254, 348, 20, 20, null);
                }
            }

            //datos del niño
            String nombre = txtNombre.getText() + " " + txtApellido.getText();
            if (nombre.length() <= 21) {
                g.drawString(nombre, 397, 178);
            } else {
                if (txtNombre.getText().length() <= 21) {
                    g.drawString(txtNombre.getText(), 397, 178);
                    g.drawString(txtApellido.getText(), 304, 197);
                } else {
                    String[] nom = txtNombre.getText().split(" ");
                    g.drawString(nom[0], 397, 178);
                    g.drawString(nom[1] + txtApellido.getText(), 304, 197);
                }
            }
            g.drawString(txtDni.getText(), 326, 216);
            g.drawString(cboSexo.getSelectedItem().toString(), 332, 234);
            g.drawString(txtEdad.getValue().toString(), 456, 234);
            String direccion = "";
            if (txtPiso.getText().equals("0") && txtDpto.getText().equals("")) {
                if (cboCalle.getSelectedItem() != null) {
                    direccion = cboCalle.getSelectedItem().toString() + " " + txtNroCalle.getText();
                } else {
                    direccion = " " + txtNroCalle.getText();
                }
            } else {
                if (cboCalle.getSelectedItem() != null) {
                    direccion = cboCalle.getSelectedItem().toString() + " " + txtNroCalle.getText() + " Piso: " + txtPiso.getText() + " Dpto.: " + txtDpto.getText();
                } else {
                    direccion = " " + txtNroCalle.getText() + " Piso: " + txtPiso.getText() + " Dpto.: " + txtDpto.getText();
                }
            }
            if (direccion.length() <= 24) {
                g.drawString(direccion, 378, 252);
            } else {
                g.drawString(cboCalle.getSelectedItem().toString(), 378, 252);
                if (txtPiso.getText().equals("0") && txtDpto.getText().equals("0")) {
                    direccion = txtNroCalle.getText();
                } else {
                    direccion = txtNroCalle.getText() + " Piso: " + txtPiso.getText() + " Dpto.: " + txtDpto.getText();
                }
                g.drawString(direccion, 304, 271);
            }
            if (cboZona.getSelectedItem().toString().equals("NO")) {
                g.drawImage(check, 352, 280, 20, 20, null);
            } else {
                if (cboZona.getSelectedItem().toString().equals("NE")) {
                    g.drawImage(check, 398, 280, 20, 20, null);
                } else {
                    if (cboZona.getSelectedItem().toString().equals("SO")) {
                        g.drawImage(check, 446, 280, 20, 20, null);
                    } else {
                        if (cboZona.getSelectedItem().toString().equals("SE")) {
                            g.drawImage(check, 493, 280, 20, 20, null);
                        }
                    }
                }
            }
            g.drawString(txtTelefono.getText(), 353, 314);
            g.drawString(txtEscuela.getText(), 348, 333);
            g.drawString(txtNivel.getText(), 334, 352);
            //datos del informante
            if (rbtnAdulto.isSelected()) {
                g.drawImage(check, 101, 414, 20, 20, null);
            } else {
                if (rbtnInstitucion.isSelected()) {
                    g.drawImage(check, 168, 414, 20, 20, null);
                } else {
                    if (rbtnNinio.isSelected()) {
                        g.drawImage(check, 253, 414, 20, 20, null);
                    }
                }
            }
            nombre = txtNombreInfo.getText() + " " + txtApellidoInfo.getText();
            if (nombre.length() <= 20) {
                g.drawString(nombre, 157, 447);
            } else {
                if (txtNombre.getText().length() <= 21) {
                    g.drawString(txtNombre.getText(), 157, 447);
                    g.drawString(txtApellido.getText(), 64, 465);
                } else {
                    String[] nom = txtNombre.getText().split(" ");
                    g.drawString(nom[0], 157, 447);
                    g.drawString(nom[1] + txtApellido.getText(), 64, 465);
                }
            }
            direccion = "";
            if (txtPiso.getText().equals("0") && txtDpto.getText().equals("")) {
                if (cboCalle.getSelectedItem() != null) {
                    direccion = cboCalle.getSelectedItem().toString() + " " + txtNroCalle.getText();
                } else {
                    direccion = " " + txtNroCalle.getText();
                }
            } else {
                if (cboCalle.getSelectedItem() != null) {
                    direccion = cboCalle.getSelectedItem().toString() + " " + txtNroCalle.getText() + " Piso: " + txtPiso.getText() + " Dpto.: " + txtDpto.getText();
                } else {
                    direccion = " " + txtNroCalle.getText() + " Piso: " + txtPiso.getText() + " Dpto.: " + txtDpto.getText();
                }
            }
            g.drawString(direccion, 137, 483);
            g.drawString(txtTelefonoInfo.getText(), 115, 502);
            g.drawString(txtInsRepresente.getText(), 121, 529);
            g.drawString(txtRelacionNinio.getText(), 178, 548);

            //orientacion del llamado
            if (rbtnAsesoradoLlamado.isSelected()) {
                g.drawImage(check, 204, 618, 20, 20, null);
                int cont = 0;
                if (!txtIntervencionRealizada.getText().equals("")) {
                    String[] asesorado = txtIntervencionRealizada.getText().split(" ");
                    String cadena = asesorado[0];
                    while (cadena.length() <= 85) {
                        cont++;
                        cadena = cadena + " " + asesorado[cont];
                    }
                    g.drawString(cadena, 69, 674);
                    cadena = "";
                    for (int i = cont; i < asesorado.length; i++) {
                        cadena = asesorado[i] + " ";
                    }
                    g.drawString(cadena, 69, 690);
                }
            } else {
                if (rbtnEquipo102.isSelected()) {
                    g.drawImage(check, 297, 618, 20, 20, null);
                } else {
                    if (rbtnDerivado.isSelected()) {
                        g.drawImage(check, 384, 618, 20, 20, null);
                        g.drawString(txtDerivado.getText(), 416, 631);
                    }
                }
            }
            Nino_Adolescente nino = caso.getNino_adolescente();
            if (!nino.getCasos().isEmpty() && nino.getCasos().size() > 1) {
                int casoActual = nino.getCasos().indexOf(caso);
                try {
                    Caso casoAux = nino.getCasos().get(casoActual - 1);
                    g.drawString(sdf.format(casoAux.getFecha()), 449, 461);
                    g.drawString(casoAux.getMotivo().toString(), 350, 482);
                    g.drawImage(check, 370, 423, 20, 20, null);
                    if (casoAux.getOrientacion() == TipoOrientacion.DERIVADO) {
                        g.drawImage(check, 371, 514, 20, 20, null);
                    } else {
                        g.drawImage(check, 468, 514, 20, 20, null);
                    }
                } catch (Exception e) {
                    g.drawImage(check, 448, 423, 20, 20, null);
                }
            } else {
                g.drawImage(check, 448, 423, 20, 20, null);
            }

            return PAGE_EXISTS;
        } else {
            return NO_SUCH_PAGE;
        }
    }
    /**
     * @param args the command line arguments
     */
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAnterior;
    private javax.swing.JButton btnCerrar;
    private javax.swing.JButton btnMinimizar;
    private javax.swing.JButton btnSiguiente;
    private javax.swing.JButton btnSiguiente2;
    private javax.swing.ButtonGroup btngDemanda;
    private javax.swing.ButtonGroup btngMotivo;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.ButtonGroup buttonGroup3;
    private javax.swing.JComboBox cboAyuda;
    private javax.swing.JComboBox cboCalle;
    private javax.swing.JComboBox cboCalleInfo;
    private javax.swing.JComboBox cboOperador;
    private javax.swing.JComboBox cboSexo;
    private javax.swing.JComboBox cboViolencia;
    private javax.swing.JComboBox cboZona;
    private com.toedter.calendar.JDateChooser dtpFecha;
    private javax.swing.JSpinner dtpHora;
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLayeredPane jLayeredPane1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JPanel pnl1;
    private javax.swing.JPanel pnl2;
    private javax.swing.JPanel pnl3;
    private javax.swing.JPanel pnl4;
    private javax.swing.JRadioButton rbtnAdulto;
    private javax.swing.JRadioButton rbtnAsesoradoLlamado;
    private javax.swing.JRadioButton rbtnAsesoramiento;
    private javax.swing.JRadioButton rbtnAyudaDirecta;
    private javax.swing.JRadioButton rbtnConductaAdictiva;
    private javax.swing.JRadioButton rbtnDerivado;
    private javax.swing.JRadioButton rbtnDesercionEscolar;
    private javax.swing.JRadioButton rbtnEquipo102;
    private javax.swing.JRadioButton rbtnInstitucion;
    private javax.swing.JRadioButton rbtnIntervencion;
    private javax.swing.JRadioButton rbtnNinio;
    private javax.swing.JRadioButton rbtnOtros;
    private javax.swing.JRadioButton rbtnProblemaConducta;
    private javax.swing.JRadioButton rbtnSituacionCalle;
    private javax.swing.JRadioButton rbtnTrabajoInfantil;
    private javax.swing.JRadioButton rbtnViolencia;
    private javax.swing.JTextField txtApellido;
    private javax.swing.JTextField txtApellidoInfo;
    private javax.swing.JTextField txtDerivado;
    private javax.swing.JTextField txtDni;
    private javax.swing.JTextField txtDpto;
    private javax.swing.JTextField txtDptoInfo;
    private javax.swing.JSpinner txtEdad;
    private javax.swing.JTextField txtEscuela;
    private javax.swing.JTextField txtInsRepresente;
    private javax.swing.JTextArea txtIntervencionRealizada;
    private javax.swing.JTextField txtNivel;
    private javax.swing.JTextField txtNombre;
    private javax.swing.JTextField txtNombreInfo;
    private javax.swing.JTextField txtNroCalle;
    private javax.swing.JTextField txtNroCalleInfo;
    private javax.swing.JTextField txtNroCaso;
    private javax.swing.JTextField txtPiso;
    private javax.swing.JTextField txtPisoInfo;
    private javax.swing.JTextField txtRelacionNinio;
    private javax.swing.JTextField txtTelefono;
    private javax.swing.JTextField txtTelefonoInfo;
    // End of variables declaration//GEN-END:variables

    private void cargarDatos() {
        //datos del caso
        txtNroCaso.setText(String.valueOf(caso.getNumeroCaso()));
        dtpFecha.setDate(caso.getFecha());
        dtpHora.setValue(caso.getHora());
        cboOperador.setSelectedItem(caso.getOperador());
        if (caso.getTipoDemanda() == TipoDemanda.ASESORAMIENTO) {
            rbtnAsesoramiento.setSelected(true);
        } else {
            if (caso.getTipoDemanda() == TipoDemanda.INTERVENCION) {
                rbtnIntervencion.setSelected(true);
            }
        }
        if (caso.getMotivo() == TipoMotivo.LEGAL || caso.getMotivo() == TipoMotivo.PSICOLOGICA) {
            rbtnAyudaDirecta.setSelected(true);
            cboAyuda.setSelectedIndex(caso.getMotivo().ordinal() - 1);
            cboAyuda.setEnabled(true);
        } else {
            if (caso.getMotivo() == TipoMotivo.MALTRATO || caso.getMotivo() == TipoMotivo.ABANDONO || caso.getMotivo() == TipoMotivo.ABUSO_SEXUAL || caso.getMotivo() == TipoMotivo.TESTIGO_VIOLENCIA) {
                rbtnViolencia.setSelected(true);
                cboViolencia.setSelectedIndex(caso.getMotivo().ordinal() - 4);
                cboViolencia.setEnabled(true);
            } else {
                if (caso.getMotivo() == TipoMotivo.CONDUCTAS_ADICTIVAS) {
                    rbtnConductaAdictiva.setSelected(true);
                } else {
                    if (caso.getMotivo() == TipoMotivo.PROBLEMAS_CONDUCTA) {
                        rbtnProblemaConducta.setSelected(true);
                    } else {
                        if (caso.getMotivo() == TipoMotivo.DESERCION_ESCOLAR) {
                            rbtnDesercionEscolar.setSelected(true);
                        } else {
                            if (caso.getMotivo() == TipoMotivo.TRABAJO_INFANTIL) {
                                rbtnTrabajoInfantil.setSelected(true);
                            } else {
                                if (caso.getMotivo() == TipoMotivo.SITUACION_CALLE) {
                                    rbtnSituacionCalle.setSelected(true);
                                } else {
                                    if (caso.getMotivo() == TipoMotivo.OTROS) {
                                        rbtnOtros.setSelected(true);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        //datos del niño
        Nino_Adolescente nino = caso.getNino_adolescente();
        txtNombre.setText(nino.getNombre());
        txtApellido.setText(nino.getApellido());
        txtDni.setText(String.valueOf(nino.getDni()));
        cboSexo.setSelectedItem(nino.getSexo());
        cboZona.setSelectedItem(nino.getZona());
        txtEdad.setValue(nino.getEdad());
        cboCalle.setSelectedItem(nino.getDireccion().getCalle());
        txtNroCalle.setText(String.valueOf(nino.getDireccion().getNuemero()));
        txtPiso.setText(String.valueOf(nino.getDireccion().getPiso()));
        txtDpto.setText(nino.getDireccion().getDepartamento());
        txtTelefono.setText(nino.getTelefono());
        txtEscuela.setText(nino.getEscuela());
        txtNivel.setText(nino.getNivel());
        //datos del informante
        Informante informante = caso.getInformante();
        if (informante.getTipoPersona() == TipoPersona.ADULTO) {
            rbtnAdulto.setSelected(true);
        } else {
            if (informante.getTipoPersona() == TipoPersona.INSTITUCION) {
                rbtnInstitucion.setSelected(true);
            } else {
                if (informante.getTipoPersona() == TipoPersona.NINIO) {
                    rbtnNinio.setSelected(true);
                }
            }
        }
        txtNombreInfo.setText(informante.getNombre());
        txtApellidoInfo.setText(informante.getApellido());
        cboCalleInfo.setSelectedItem(informante.getDireccion().getCalle());
        txtNroCalleInfo.setText(String.valueOf(informante.getDireccion().getNuemero()));
        txtPisoInfo.setText(String.valueOf(informante.getDireccion().getPiso()));
        txtDptoInfo.setText(informante.getDireccion().getDepartamento());
        txtTelefonoInfo.setText(informante.getTelefono());
        txtInsRepresente.setText(informante.getInstitucionQueRepresenta());
        txtRelacionNinio.setText(caso.getRelacionNinio().getRelacion());
        //datos de la orientacion
        if (caso.getOrientacion() == TipoOrientacion.ASESORADO_EN_LLAMADO) {
            rbtnAsesoradoLlamado.setSelected(true);
            txtIntervencionRealizada.setText(caso.getIntevencionRealizada());
        } else {
            if (caso.getOrientacion() == TipoOrientacion.DERIVADO) {
                rbtnDerivado.setSelected(true);
                txtDerivado.setText(caso.getInstitucionDerivado());
            } else {
                if (caso.getOrientacion() == TipoOrientacion.EQUIPO_102) {
                    rbtnEquipo102.setSelected(true);
                }
            }
        }
    }

    public void guardarDatos(char confirmacion) {
        Nino_Adolescente nino = caso.getNino_adolescente();
        //direccion del niño
        Direccion aux = ControladorPrincipal.getInstance().getControladorPersonas().existe_direccion((Calle) cboCalle.getSelectedItem(), Integer.valueOf(txtNroCalle.getText()), Integer.valueOf(txtPiso.getText()), txtDpto.getText());
        Direccion direccionNino = null;
        if (aux == null) {
            direccionNino = new Direccion();
            direccionNino.setCalle((Calle) cboCalle.getSelectedItem());
            direccionNino.setDepartamento(txtDpto.getText());
            direccionNino.setNuemero(Integer.valueOf(txtNroCalle.getText()));
            direccionNino.setPiso(Integer.valueOf(txtPiso.getText()));
            ControladorPrincipal.getInstance().guardar(direccionNino);
        } else {
            direccionNino = aux;
        }
        //datos del niño
        nino.setApellido(txtApellido.getText());
        nino.setDireccion(direccionNino);
        nino.setDni(Long.parseLong(txtDni.getText()));
        nino.setEdad((Integer) txtEdad.getValue());
        nino.setEscuela(txtEscuela.getText());
        nino.setNivel(txtNivel.getText());
        nino.setNombre(txtNombre.getText());
        nino.setSexo((TipoSexo) cboSexo.getSelectedItem());
        nino.setTelefono(txtTelefono.getText());
        nino.setZona((TipoZona) cboZona.getSelectedItem());
        ControladorPrincipal.getInstance().getControladorPersonas().actualizarNinio(nino);
        if (direccionNino.getPersonas() == null) {
            direccionNino.setPersonas(new ArrayList<Persona>());
            direccionNino.getPersonas().add(nino);
            ControladorPrincipal.getInstance().guardar(direccionNino);
        } else {
            if (!direccionNino.getPersonas().contains(nino)) {
                direccionNino.getPersonas().add(nino);
                ControladorPrincipal.getInstance().guardar(direccionNino);
            }
        }
        //direccion del informante
        aux = ControladorPrincipal.getInstance().getControladorPersonas().existe_direccion((Calle) cboCalleInfo.getSelectedItem(), Integer.valueOf(txtNroCalleInfo.getText()), Integer.valueOf(txtPisoInfo.getText()), txtDptoInfo.getText());
        Direccion direccionInfo = null;
        if (aux == null) {
            direccionInfo = new Direccion();
            direccionInfo.setCalle((Calle) cboCalleInfo.getSelectedItem());
            direccionInfo.setDepartamento(txtDptoInfo.getText());
            direccionInfo.setNuemero(Integer.valueOf(txtNroCalleInfo.getText()));
            direccionInfo.setPiso(Integer.valueOf(txtPisoInfo.getText()));
            ControladorPrincipal.getInstance().guardar(direccionInfo);
        } else {
            direccionInfo = aux;
        }
        //datos del informante
        RelacionNinio relacion = caso.getRelacionNinio();
        relacion.setRelacion(txtRelacionNinio.getText());
        ControladorPrincipal.getInstance().guardar(relacion);

        if (confirmacion == 's') {
            informante = new Informante();
            if (informante.getRelacionNinios() == null) {
                informante.setRelacionNinios(new ArrayList<RelacionNinio>());
            }
            relacion.setInformante(informante);
            informante.getRelacionNinios().add(relacion);
        } else {
            if (confirmacion == 'n') {
                informante = caso.getInformante();
            } else {
                if (confirmacion == 'b') {
                    if (informante.getRelacionNinios() == null) {
                        informante.setRelacionNinios(new ArrayList<RelacionNinio>());
                    }
                    informante.getRelacionNinios().add(relacion);
                    relacion.setInformante(informante);
                }
            }
        }
        informante.setApellido(txtApellidoInfo.getText());
        informante.setDireccion(direccionInfo);
        informante.setInstitucionQueRepresenta(txtInsRepresente.getText());
        informante.setNombre(txtNombreInfo.getText());
        informante.setTelefono(txtTelefonoInfo.getText());
        if (rbtnAdulto.isSelected()) {
            informante.setTipoPersona(TipoPersona.ADULTO);
        } else {
            if (rbtnInstitucion.isSelected()) {
                informante.setTipoPersona(TipoPersona.INSTITUCION);
            } else {
                if (rbtnNinio.isSelected()) {
                    informante.setTipoPersona(TipoPersona.NINIO);
                }
            }
        }
        ControladorPrincipal.getInstance().getControladorPersonas().actualizarInformante(informante);
        if (direccionInfo.getPersonas() == null) {
            direccionInfo.setPersonas(new ArrayList<Persona>());
            direccionInfo.getPersonas().add(informante);
            ControladorPrincipal.getInstance().guardar(direccionInfo);
        } else {
            if (!direccionInfo.getPersonas().contains(informante)) {
                direccionInfo.getPersonas().add(informante);
                ControladorPrincipal.getInstance().guardar(direccionInfo);
            }
        }
        //datos del caso
        caso.setNumeroCaso(Long.valueOf(txtNroCaso.getText()));
        caso.setFecha(dtpFecha.getDate());
        caso.setHora((Date) dtpHora.getValue());
        caso.setOperador((Operador) cboOperador.getSelectedItem());
        if (rbtnAyudaDirecta.isSelected()) {
            caso.setMotivo(TipoMotivo.valueOf(cboAyuda.getSelectedItem().toString()));
        } else {
            if (rbtnViolencia.isSelected()) {
                caso.setMotivo(TipoMotivo.valueOf(cboViolencia.getSelectedItem().toString()));
            } else {
                if (rbtnConductaAdictiva.isSelected()) {
                    caso.setMotivo(TipoMotivo.CONDUCTAS_ADICTIVAS);
                } else {
                    if (rbtnProblemaConducta.isSelected()) {
                        caso.setMotivo(TipoMotivo.PROBLEMAS_CONDUCTA);
                    } else {
                        if (rbtnDesercionEscolar.isSelected()) {
                            caso.setMotivo(TipoMotivo.DESERCION_ESCOLAR);
                        } else {
                            if (rbtnTrabajoInfantil.isSelected()) {
                                caso.setMotivo(TipoMotivo.TRABAJO_INFANTIL);
                            } else {
                                if (rbtnSituacionCalle.isSelected()) {
                                    caso.setMotivo(TipoMotivo.SITUACION_CALLE);
                                } else {
                                    if (rbtnOtros.isSelected()) {
                                        caso.setMotivo(TipoMotivo.OTROS);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        caso.setInformante(informante);
        caso.setInstitucionDerivado(txtDerivado.getText());
        caso.setIntevencionRealizada(txtIntervencionRealizada.getText());
        caso.setNino_adolescente(nino);
        if (rbtnAsesoradoLlamado.isSelected()) {
            caso.setOrientacion(TipoOrientacion.ASESORADO_EN_LLAMADO);
        } else {
            if (rbtnEquipo102.isSelected()) {
                caso.setOrientacion(TipoOrientacion.EQUIPO_102);
            } else {
                if (rbtnDerivado.isSelected()) {
                    caso.setOrientacion(TipoOrientacion.DERIVADO);
                }
            }
        }
        if (rbtnAsesoramiento.isSelected()) {
            caso.setTipoDemanda(TipoDemanda.ASESORAMIENTO);
        } else {
            if (rbtnIntervencion.isSelected()) {
                caso.setTipoDemanda(TipoDemanda.INTERVENCION);
            }
        }
        ControladorPrincipal.getInstance().guardar(caso);

        if (confirmacion == 's' || confirmacion == 'b') {
            if (informante.getCasos() == null) {
                informante.setCasos(new ArrayList<Caso>());
            }
            informante.getCasos().add(caso);
            ControladorPrincipal.getInstance().guardar(informante);
        }

        //datos del llamado
        Llamado llamado = caso.getLlamado();
        llamado.setFecha(dtpFecha.getDate());
        llamado.setHora((Date) dtpHora.getValue());
        llamado.setOperador((Operador) cboOperador.getSelectedItem());
        ControladorPrincipal.getInstance().guardar(llamado);

        MensajesInfo p1 = new MensajesInfo('n', "GuardarExito");
        p1.setLocationRelativeTo(null);
        p1.setIconImage(icono);
        p1.setVisible(true);
        Shape shape = new RoundRectangle2D.Float(0, 0, p1.getWidth(), p1.getHeight(), 30, 30);
        AWTUtilities.setWindowShape(p1, shape);

        this.dispose();
    }
}
